
import {
  request
} from "../../api/request.js";


// 获取机构列表
export function getOrgList(params,isCustomLoading) {
  return request(
    `/api/ServiceOrganization`,
    "get",
    params,
    isCustomLoading
  );
}

// 获取我预约的机构列表
export function getMyAppointOrg(params,isCustomLoading) {
  return request(
    `/api/ReceptionAppointOrg`,
    "get",
    params,
    isCustomLoading
  );
}

// 获取我收藏的机构列表
export function getMyCollectOrgList(params,isCustomLoading) {
  return request(
    `/api/Collectorg`,
    "get",
    params,
    isCustomLoading
  );
}

// 获取机构详情
export function getOrgDetail(id,isCustomLoading) {
  return request(
    `/api/ServiceOrganization/${id}`,
    "get",
    {},
    isCustomLoading
  );
}

// 收藏机构
export function sureCollect(id) {
  return request(
    `/api/Collectorg/${id}/CollectOrg`,
    "put",
    {}
  );
}

// 取消收藏机构
export function cancelCollect(id) {
  return request(
    `/api/Collectorg/${id}/Cancel`,
    "put",
    {}
  );
}

// 预约机构
export function submitAppointOrg(data) {
  return request(
    `/api/ReceptionAppointOrg`,
    "post",
    data
  );
}
